Skip to content

ESMv0.5.0: changes to CMEPS to enable atm-wav coupling in Sofar ESM#8

Open
miguelsolanocordoba wants to merge 54 commits intomainfrom
msdev/cmeps
Open

ESMv0.5.0: changes to CMEPS to enable atm-wav coupling in Sofar ESM#8
miguelsolanocordoba wants to merge 54 commits intomainfrom
msdev/cmeps

Conversation

@miguelsolanocordoba
Copy link
Copy Markdown

@miguelsolanocordoba miguelsolanocordoba commented Mar 14, 2025

Description of changes

This PR modifies the CMEPS mediator in order to be able to run Sofar's atmosphere-wave coupled ESM and adds masking options for run-time configuration (esm_run.config) that avoid need to re-build the entire Sofar ESM for testing. It solves the these issues [1,2], which are described in more detail here.

Specific notes

  • wavespotter/CMEPS main branch was synced with upstream fork (ESCOMP/CMEPS) prior to this PR, in order to highlight Sofar-specific changes. The changes in the upstream repo are mostly bug fixes, and often CESM specific additions. There are a number of improvements to atm-lnd coupling and glacier run-off options, but none of these changes should impact our coupling.
  • The branch that this PR is based on (msdev/cmeps), was branched off initial and extensive modifications by @StevePny in dev/buildfix that were made to modify the public CMEPS mediator to work with Sofar's ESM.
  • The main addition of msdev/cmeps is to specify srcMaskValues and dstMaskValues at run-time is built into the AdvertiseFields subroutine in the mediator (med.F90) and in the med_map_routehandles_initfrom_field subroutine (med_map_mod.F90), and requires setting coupling_mode='sofar.aw' since the changes in this PR are focused on atm-wav only. It
  • The proper use of the masks should be revisited when the ocean (MOM6) is brought in.

Contributors other than yourself, if any:

@StevePny

CMEPS Issues Fixed (include github issue #):

resolves esm-run-scripts#183
resolves esm-run-scripts#191

Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial)

Yes. Although coupling in Sofar ESM was running (without external forcing for WW3), the output produced was empty due to the masking issue. Fields are now produced with a standard configuration, which makes srcMaskWav=1, and sets the remaining values to ispval (default-> no masking).

Any User Interface Changes (namelist or namelist defaults changes)?

No

Testing performed

Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing
Several cases where tested, changing the values of srcMaskAtm, dstMaskAtm, srcMaskWav and dstMaskWav, which as of this PR can be changed at runtime. Setting srcMaskAtm=1 (masking land from field exported by ATM) causes a segmentation fault. The two cases tested to work, involve setting all masks to ispaval (-987987) or changing only the srcMaskWav=1 (i.e. masking wave fields (charnock) over land), which yield similar but not identical results.

StevePny and others added 30 commits June 13, 2024 16:01
add shared directory to cmake build
added new CMakeLists.txt file for shared directory
provide information about file sources
adding some instructions for building
added for clarity
adding sofar file
new, but seems like a necessary change
add include directories for shared library
create template for makefile fragment
simplifying
These probably won't change
synching with forked source
merge with upstream main
rebase to upstream main
@miguelsolanocordoba miguelsolanocordoba self-assigned this Mar 14, 2025
@miguelsolanocordoba miguelsolanocordoba added bug Something isn't working enhancement New feature or request labels Mar 14, 2025
@miguelsolanocordoba miguelsolanocordoba changed the title Msdev/cmeps ESMv0.5.0: changes to CMEPS to enable atm-wav coupling in Sofar ESM Mar 19, 2025
Copy link
Copy Markdown
Collaborator

@StevePny StevePny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the other repos, this should be merged into dev/buildfix and not main. That will highlight the changes that are relevant with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants